package router

import (
	"github.com/gogf/gf/frame/g"
	"live/app/api/wsapi"
	"live/app/service/ws"
)

func init() {
	s := g.Server()
	//s.Group("/", func(group *ghttp.RouterGroup) {
	//	group.ALL("/ws", wsapi.Conn)
	//})
	group := s.Group("/")
	group.ALL("/ws", wsapi.Conn)


	// 注册ws方法
	ws.RegisterMsg("join_room", wsapi.JoinRoom)
	ws.RegisterMsg("exit_room", wsapi.ExitRoom)
}
